package com.zuora.interview.topn.util;

/**
 * Created by chunyang.gao on 2016/2/28.
 */
public class Clock {

    long start ;

    long lastCheckPoint;

    public Clock(long start) {
        this.start = start;
    }

    public static Clock start(){
        return new Clock(System.currentTimeMillis());
    }

    public long checkTime(){
        lastCheckPoint = System.currentTimeMillis();
        return lastCheckPoint -start;
    }
}
